<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

		<rich:panel header="#{messages['edit.product.calendar.category']}">
			<h:panelGrid ><h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText></h:panelGrid>
			
			<h:panelGrid width="100%">
				<h:outputText value="#{messages['product.calendar.category.info']}"
					styleClass="sub_header" />
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputText value="#{messages['instruction']}"
						styleClass="standardText_Instruction" />
				</h:panelGroup>
			</h:panelGrid>
			
			<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
			
				<h:outputText></h:outputText>
				<h:panelGroup>
				  	<h:outputText value="*" styleClass="standardText_Mandatory" /> 
					<h:outputText value="#{messages['instruction']}" styleClass="standardText_Instruction" />
				</h:panelGroup>
				
				<h:outputText></h:outputText>
				<t:message for="Code" styleClass="error"></t:message>
			
			    <h:panelGroup>
			    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
				    <h:outputLabel for="Code" value="#{messages['code']}" styleClass="standardText_Label" />
			    </h:panelGroup>
			    <h:panelGroup>
			    	<t:inputText id="Code" required="true" size="10" maxlength="10" styleClass="standardText" value=""></t:inputText>
			    </h:panelGroup>
			    
			    <h:outputText></h:outputText>
				<t:message for="Name" styleClass="error"></t:message>
			    
				<h:panelGroup>
			    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
				    <h:outputLabel for="Name" value="#{messages['name']}" styleClass="standardText_Label" />
			    </h:panelGroup>
			    <h:panelGroup>
			    	<t:inputText id="Name" required="true" size="50" maxlength="50" styleClass="standardText" value=""></t:inputText>
			    </h:panelGroup>
			    
			    <h:outputText></h:outputText>
				<t:message for="desc" styleClass="error"></t:message>
				
				<h:panelGroup>
					<h:outputText value="*" styleClass="standardText_Mandatory" />
					<h:outputLabel for="desc" value="#{messages['desc']}" styleClass="standardText_Label" />
				</h:panelGroup>
				<h:panelGroup>
					<t:inputTextarea id="desc" cols="20" rows="5" value=""></t:inputTextarea>
				</h:panelGroup>
				
			    <h:outputText></h:outputText>
				<t:message for="date" styleClass="error"></t:message>
			
			    <h:panelGroup>
			    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
				    <h:outputLabel for="date" value="#{messages['effective.date']}" styleClass="standardText_Label" />
			    </h:panelGroup>
			    <h:panelGroup>
			    	<t:inputCalendar
			    	id="date"
						monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
						currentDayCellClass="currentDayCell" value=""
						renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
						popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
						renderPopupButtonAsImage="true"
						styleClass="standardText" required="true">
			    	</t:inputCalendar>
			    </h:panelGroup>
			    
			    <h:outputText></h:outputText>
				<t:message for="exdate" styleClass="error"></t:message>
			
			    <h:panelGroup>
			    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
				    <h:outputLabel for="exdate" value="#{messages['expiry.date']}" styleClass="standardText_Label" />
			    </h:panelGroup>
			    <h:panelGroup>
			    	<t:inputCalendar
			    	id="exdate"
						monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
						currentDayCellClass="currentDayCell" value=""
						renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
						popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
						renderPopupButtonAsImage="true"
						styleClass="standardText" required="true">
			    	</t:inputCalendar>
				</h:panelGroup>
				
			</t:panelGrid>
			
				
				
			<h:panelGrid width="100%">
				<h:outputText value="#{messages['product.calendar.info']}"
					styleClass="sub_header" />
			</h:panelGrid>
			
			<t:panelGrid>
				<h:commandLink styleClass="standardText_Label" value="#{messages['add.more']}" action="adminCalendarMgmt"  immediate="true"></h:commandLink>
			</t:panelGrid>
				
		  <rich:spacer height="30"></rich:spacer>	
		   <t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		   		<t:outputText></t:outputText>
		   		<t:panelGroup>
			   		<h:commandButton value="#{messages['update']}" styleClass="button" action=""></h:commandButton>
			   		<f:verbatim>&nbsp;</f:verbatim>
				    <h:commandButton value="#{messages['back']}" styleClass="button" action="" immediate="true"></h:commandButton>
			    </t:panelGroup>
		   </t:panelGrid>
		
		</rich:panel>
